﻿using CKS2320.Common.Model;
using CKS2320.Domain.DBEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CKS2320.Repository.Interface
{
    public interface IEquipmentfailureRepository
    {
        /// <summary>
        /// 获取故障码表
        /// </summary>
        /// <param name="ip"></param>
        /// <returns></returns>
        IEnumerable<Equipmentfailure> GetEquipmentfailures(string ip, string Language = "CN");
        /// <summary>
        /// 更新一条
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        ResultReturn Edit(Equipmentfailurehistory entity);
        /// <summary>
        /// 根据ID获取一条
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Equipmentfailurehistory? GetById(string Id);
        /// <summary>
        /// 插入一条故障记录
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        ResultReturn InsertHistory(Equipmentfailurehistory entity);
        /// <summary>
        /// 获取历史故障记录
        /// </summary>
        /// <param name="ip"></param>
        /// <returns></returns>
        IEnumerable<EquipmentfailurehistoryModel> GetEquipmentfailureHistory(DateTime historyDate, string Language);
        /// <summary>
        /// 获取正在故障阶段的记录
        /// </summary>
        /// <param name="ip"></param>
        /// <returns></returns>
        IEnumerable<EquipmentfailurehistoryModel> GetFailureHistory(string ip, string Language);
    }
}
